package shiyl.use.springboot.loadbalance.impl;

import org.hyperledger.fabric.sdk.Orderer;
import shiyl.use.springboot.loadbalance.AbstractLoader;

/**
 * Fabric 中Orderer节点进行适配，以支持负载均衡
 * @author shiyl
 */
public class OrdererLoader extends AbstractLoader<Orderer> {

    Orderer orderer ;

    public OrdererLoader(Orderer orderer, int weight , boolean sticky){
        super(weight,sticky) ;
        this.orderer = orderer ;
    }

    @Override
    public String getUrl() {

        return this.orderer.getUrl() ;
    }

    @Override
    public Orderer getEndpoint() {
        return this.orderer;
    }
}
